1. Field of the Invention
The present invention relates to a histogram equalization circuit based on a cumulative distribution function (CDF) calculation area and a method therefor. More particularly, it relates to a circuit for obtaining a CDF value by selecting a predetermined section of an image as the CDF calculation area and histogram equalizing an image signal of a predetermined period based on the CDF value and a method therefor.
This application for an image histogram equalization circuit and method is based on Korean Patent Application No. 96-24413 which is incorporated by reference herein for all purposes.
2. Related Art
The basic operation of histogram equalization is to convert a given input image based on the histogram of the input image. The histogram of an image is a gray level distribution of the given input image. The histogram provides an entire description of the appearance of the image. A gray level which is appropriately controlled with respect to the given image improves the appearance of the image or a contrast thereof.
Histogram equalization is a method for enhancing the contrast of the given image according to the gray level distribution of the image and is the most widely known among the various methods for enhancing the contrast, such as those described in the following documents: [1] J. S. Lim, "Two-Dimensional Signal and Image Processing," Prentice Hall, Englewood Cliffs, N.J. 1990; and [2] R. C. Gonzalez and P. Wints, "Digital Image Processing," Addison-Wesley, Reading, Mass., 1977.
Useful application of the histogram equalization method, including medical image processing and radar image processing, are described in the following documents: [3] J. Zimmerman, S. Pizer, E. Staab, E. Perry, W. McCartney, and B. Brenton, "Evaluation of the Effectiveness of Adaptive Histogram Equalization For Contrast Enhancement," IEEE Transaction on Medical Imaging, pp. 304-312, Dec. 1988; and [4] Y. Li, W. Wang, and D. Y. Yu, "application of Adaptive Histogram Equalization to X-Ray Chest Image," Proceedings of the SPIE, pp. 513-514, vol. 2321, spring 1994.
Generally, the histogram equalization flattens the gray level distribution of the image, thus enhancing the contrast of the image by enlarging its dynamic range.
Hereinafter, a typical histogram equalization method is simply described.
A given image {X} is described by L discrete gray levels {X.sub.0, X.sub.1, . . . , X.sub.L-1 }, where, X.sub.0 and X.sub.L-1 denote a black level and a white level, respectively.
A probability density function (PDF) is defined as: ##EQU1##
Here, n.sub.k denotes the number of times of a gray level X.sub.k appears in image {X} and n denotes the total number of samples in image {X}. At this time, the CDF is defined as follows. ##EQU2##
An output Y of the typical histogram equalization with respect to the input sample X.sub.k of the given image based on the CDF value is expressed as follows: EQU Y=c(X.sub.k)X.sub.L-1 (3)
Therefore, by mapping the levels of the input image to new gray levels based on the CDF, picture quality is improved by enhancing the contrast of the entire screen.
FIG. 1A shows an example of the PDF of a specific image. The PDF is the result in which the number of pixels of the respective gray levels is counted, receiving a luminance signal whose brightness is between the minimum gray level "0" and the maximum gray level MAX "100" and the number is divided by the total number of pixels in the image. The input image shown in FIG. 1A is concentrated between a gray level "30" and a gray level "90".
The CDF is obtained using Formula (2) based on the PDF shown in FIG. 1A. The output after performing the histogram equalization using the CDF as a conversion function is expressed by the Formula (3). The PDF of the equalized image is shown in FIG. 1B. Therefore, when the input image, concentrated over the range "30-90" shown in FIG. 1A, is histogram equalized, it is mapped to the gray level "10-100", as shown in FIG. 1B. Thus, the contrast is enhanced and a clear picture is provided.
The quantity of hardware is closely related to how the CDF calculation area is set to obtain the CDF value based on the PDF. Namely, when the CDF value is obtained by summing over many input pixels, the correlation between the input and output images is improved, but the quantity of hardware required increases. Therefore, it is necessary to set up an appropriate CDF calculation area so as to heighten the correlation between the input data and the equalized data and to simplify the hardware.